/*
 * @Autor: dc
 * @Date: 2022-03-22 10:39:57
 * @LastEditors: dc
 * @LastEditTime: 2022-03-29 11:08:50
 * @Description: 
 */

import React, { Component } from 'react';
import { Route, Switch,Redirect } from 'react-router-dom'
import MyNavLink from '../../components/MyNavLink'
import News from './News'
import Message from './Message'



export default class Home extends Component {
    render() {
        // console.log('Home的组件收到的props', this.props)

        return (
            <div className='bold'>
                <h2>这里是home</h2>
                <div className="center_div">
                    <div className='navgation flex_center'>
                        <MyNavLink to="/home/news">News</MyNavLink>
                        <MyNavLink to="/home/message">Message</MyNavLink>
                    </div>
                    <div className='conter flex_center'>
                        <Switch>
                            <Route path="/home/news" component={News} />
                            <Route path="/home/message" component={Message} />
                        </Switch>
                    </div>
                    <div>
                        
                    </div>
                </div>
            </div>
        );
    }
}

